From: Dale Wijnand Date: Tue, 10 Apr 2018 05:48:00 +0000 (+0100) Subject: document SourceId::from_cwd X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~1^2~81^2~6 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=1955a80902a01694e3ecb5418f4b68961b0bfa43;p=cargo.git document SourceId::from_cwd --- diff --git a/src/cargo/core/source/source_id.rs b/src/cargo/core/source/source_id.rs index 96f5ff660..7bf6e63fc 100644 --- a/src/cargo/core/source/source_id.rs +++ b/src/cargo/core/source/source_id.rs @@ -167,6 +167,9 @@ impl SourceId { SourceId::new(Kind::Directory, url) } + /// Create a SourceId from the current working directory filesystem path. + /// + /// Pass absolute path pub fn from_cwd(path: &Path) -> CargoResult { let url = path.to_url()?; Ok(SourceId {